package org.opengauss;/*
 * Copyright (c) @ justbk. 2021-2031. All rights reserved.
 */

/**
 * Title: the SqlConstant class.
 * <p>
 * Description:
 *
 * @author Administrator
 * @version [issueManager 0.0.1, 2021/10/21]
 * @since 2021/10/21
 */
public class SqlConstant {
    public static final String[] USED_SQLS = {
            "SELECT d_tax, d_next_o_id     FROM bmsql_district     WHERE d_w_id = ? AND d_id = ?     FOR UPDATE",
            "UPDATE bmsql_district     SET d_ytd = d_ytd + ?     WHERE d_w_id = ? AND d_id = ?",
            "SELECT count(*) AS low_stock FROM (    SELECT s_w_id, s_i_id, s_quantity         FROM bmsql_stock         WHERE s_w_id = ? AND s_quantity < ? AND s_i_id IN (            SELECT ol_i_id                 FROM bmsql_district                 JOIN bmsql_order_line ON ol_w_id = d_w_id                  AND ol_d_id = d_id                  AND ol_o_id >= d_next_o_id - 20                  AND ol_o_id < d_next_o_id                 WHERE d_w_id = ? AND d_id = ?         )     ) AS L",
            "SELECT c_first, c_middle, c_last, c_balance     FROM bmsql_customer     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?",
            "SELECT no_o_id     FROM bmsql_new_order     WHERE no_w_id = ? AND no_d_id = ?     ORDER BY no_o_id ASC",
            "SELECT d_name, d_street_1, d_street_2, d_city,        d_state, d_zip     FROM bmsql_district     WHERE d_w_id = ? AND d_id = ?",
            "UPDATE bmsql_warehouse     SET w_ytd = w_ytd + ?     WHERE w_id = ?",
            "DELETE FROM bmsql_new_order     WHERE no_w_id = ? AND no_d_id = ? AND no_o_id = ?",
            "SELECT c_discount, c_last, c_credit, w_tax     FROM bmsql_customer c     JOIN bmsql_warehouse w ON (w.w_id = c.c_w_id)     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?",
            "SELECT max(o_id) FROM bmsql_oorder WHERE o_w_id = ? AND o_d_id = ? AND o_c_id = ?",
            "UPDATE bmsql_oorder     SET o_carrier_id = ?     WHERE o_w_id = ? AND o_d_id = ? AND o_id = ?",
            "SELECT o_id, o_entry_d, o_carrier_id     FROM bmsql_oorder     WHERE o_w_id = ? AND o_d_id = ? AND o_c_id = ?       AND o_id = ?",
            "SELECT w_name, w_street_1, w_street_2, w_city,        w_state, w_zip     FROM bmsql_warehouse     WHERE w_id = ? ",
            "SELECT o_c_id     FROM bmsql_oorder     WHERE o_w_id = ? AND o_d_id = ? AND o_id = ?",
            "UPDATE bmsql_district     SET d_next_o_id = d_next_o_id + 1     WHERE d_w_id = ? AND d_id = ?",
            "SELECT c_id     FROM bmsql_customer     WHERE c_w_id = ? AND c_d_id = ? AND c_last = ?     ORDER BY c_first",
            "SELECT c_first, c_middle, c_last, c_street_1, c_street_2,        c_city, c_state, c_zip, c_phone, c_since, c_credit,        c_credit_lim, c_discount, c_balance     FROM bmsql_customer     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?     FOR UPDATE",
            "SELECT ol_i_id, ol_supply_w_id, ol_quantity,        ol_amount, ol_delivery_d     FROM bmsql_order_line     WHERE ol_w_id = ? AND ol_d_id = ? AND ol_o_id = ?     ORDER BY ol_w_id, ol_d_id, ol_o_id, ol_number",
            "INSERT INTO bmsql_oorder (    o_id, o_d_id, o_w_id, o_c_id, o_entry_d,     o_ol_cnt, o_all_local) VALUES (?, ?, ?, ?, ?, ?, ?)",
            "UPDATE bmsql_order_line     SET ol_delivery_d = ?     WHERE ol_w_id = ? AND ol_d_id = ? AND ol_o_id = ?",
            "UPDATE bmsql_customer     SET c_balance = c_balance - ?,         c_ytd_payment = c_ytd_payment + ?,         c_payment_cnt = c_payment_cnt + 1     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?",
            "INSERT INTO bmsql_new_order (    no_o_id, no_d_id, no_w_id) VALUES (?, ?, ?)",
            "SELECT c_data     FROM bmsql_customer     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?",
            "SELECT sum(ol_amount) AS sum_ol_amount     FROM bmsql_order_line     WHERE ol_w_id = ? AND ol_d_id = ? AND ol_o_id = ?",
            "SELECT i_price, i_name, i_data     FROM bmsql_item     WHERE i_id = ?",
            "SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = ? AND s_i_id = ?     FOR UPDATE",
//            "SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE s_w_id = ? AND s_i_id = ?",
//            "SELECT s_quantity, s_data,        s_dist_01, s_dist_02, s_dist_03, s_dist_04,        s_dist_05, s_dist_06, s_dist_07, s_dist_08,        s_dist_09, s_dist_10     FROM bmsql_stock     WHERE  s_i_id = ?",
//            "SELECT s_quantity, s_data  FROM bmsql_stock     WHERE s_w_id = ? AND s_i_id = ?",
            "INSERT INTO bmsql_history (    h_c_id, h_c_d_id, h_c_w_id, h_d_id, h_w_id,     h_date, h_amount, h_data) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
            "UPDATE bmsql_customer     SET c_balance = c_balance + ?,         c_delivery_cnt = c_delivery_cnt + 1     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?",
            "UPDATE bmsql_customer     SET c_balance = c_balance - ?,         c_ytd_payment = c_ytd_payment + ?,         c_payment_cnt = c_payment_cnt + 1,         c_data = ?     WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?",
            "UPDATE bmsql_stock     SET s_quantity = ?, s_ytd = s_ytd + ?,         s_order_cnt = s_order_cnt + 1,         s_remote_cnt = s_remote_cnt + ?     WHERE s_w_id = ? AND s_i_id = ?",
            "INSERT INTO bmsql_order_line (    ol_o_id, ol_d_id, ol_w_id, ol_number,     ol_i_id, ol_supply_w_id, ol_quantity,     ol_amount, ol_dist_info) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
            "select count(*) from pg_class"
    };
    
}
